Skip to content

[ZEPPELIN-6506] Return empty list instead of null from completion() in Groovy interpreter#5287

Open
miinhho wants to merge 1 commit into
apache:masterfrom
miinhho:master
Open

[ZEPPELIN-6506] Return empty list instead of null from completion() in Groovy interpreter#5287
miinhho wants to merge 1 commit into
apache:masterfrom
miinhho:master

Conversation

@miinhho

@miinhho miinhho commented Jul 11, 2026

Copy link
Copy Markdown

What is this PR for?

Fix GroovyInterpreter.completion() to return an empty list instead of null when autocomplete is not supported. This aligns with the collection-returning method contract (Effective Java Item 54), avoids potential NullPointerExceptions in the completion call chain, and provides a safer API for programmatic use.

What type of PR is it?

Bug Fix

Todos

  • Fix GroovyInterpreter.completion() to return an empty list instead of null

What is the Jira issue?

How should this be tested?

  • Run the existing Groovy interpreter tests to ensure no regressions.

Screenshots (if appropriate)

N/A

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@devyeony

Copy link
Copy Markdown
Contributor

LGTM :)

@ParkGyeongTae ParkGyeongTae left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants